/*
 * IInvoiceModel.java
 * business
 *
 * Created by ChenTao on 2017/1/7.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.model;

import com.yidiandao.business.data.bean.TaxInvoice;
import com.yidiandao.business.data.response.GetCartInvoiceResponse;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;

import java.util.List;

/**
 * 发票Model
 */
public interface IInvoiceModel {

    interface OnLoadInvoiceListener {

        void onSuccess(List<DisplayListItem> displayListItems, boolean emptyData, boolean hasMoreData);

        void onFailed();
    }

    interface OnNetAccessListener {

        void onSuccess();

        void onFailed();
    }

    interface OnLoadTaxInvoiceListener {

        void onSuccess(TaxInvoice taxInvoice);

        void onFailed();
    }

    interface OnGetCartInvoiceListListener {

        void onSuccess(GetCartInvoiceResponse.Data response);

        void onFailed();

    }

    /**
     * 普通发票列表地
     */
    void loadNormalInvoiceList(boolean isRefreshing, String pagerTag, OnLoadInvoiceListener listener);

    /**
     * 添加普通发票
     */
    void addNormalInvoice(String invoiceTitle, String tag, OnNetAccessListener listener);

    /**
     * 删除普通发票
     */
    void deleteNormalInvoice(String invId, String tag, OnNetAccessListener listener);

    /**
     * 修改普通发票
     */
    void updateNormalInvoice(String invId, String invTitle, String tag, OnNetAccessListener listener);

    /**
     * 设置默认的普通发票
     */
    void setDefaultNormalInvoice(String invId, String tag, OnNetAccessListener listener);

    /**
     * 获取增值税发票信息
     */
    void getTaxInvoice(String tag, OnLoadTaxInvoiceListener listener);

    /**
     * 更新增值税发票
     */
    void updateTaxInvoice(TaxInvoice taxInvoice, String tag, OnLoadTaxInvoiceListener listener);

    /**
     * 获取确认订单发票列表
     */
    void getCartInvoices(String tag, OnGetCartInvoiceListListener listener);

    void changeInvoice(String tag, String invType, String invTitle, OnNetAccessListener listener);

    void postRefreshNormalInvoiceEvent();
}
